3.26 \(\int \sqrt{a \cot ^2(x)} \, dx\)

Optimal. Leaf size=16 \[ \tan (x) \sqrt{a \cot ^2(x)} \log (\sin (x)) \]

[Out]

Sqrt[a*Cot[x]^2]*Log[Sin[x]]*Tan[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0205653, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3658, 3475} \[ \tan (x) \sqrt{a \cot ^2(x)} \log (\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a*Cot[x]^2],x]

[Out]

Sqrt[a*Cot[x]^2]*Log[Sin[x]]*Tan[x]

Rule 3658

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Tan[e + f*x]^n)^FracPart[p])/(Tan[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \sqrt{a \cot ^2(x)} \, dx &=\left (\sqrt{a \cot ^2(x)} \tan (x)\right ) \int \cot (x) \, dx\\ &=\sqrt{a \cot ^2(x)} \log (\sin (x)) \tan (x)\\ \end{align*}

Mathematica [A]  time = 0.0066614, size = 16, normalized size = 1. \[ \tan (x) \sqrt{a \cot ^2(x)} \log (\sin (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a*Cot[x]^2],x]

[Out]

Sqrt[a*Cot[x]^2]*Log[Sin[x]]*Tan[x]

________________________________________________________________________________________

Maple [A]  time = 0.073, size = 22, normalized size = 1.4 \begin{align*} -{\frac{\ln \left ( \left ( \cot \left ( x \right ) \right ) ^{2}+1 \right ) }{2\,\cot \left ( x \right ) }\sqrt{a \left ( \cot \left ( x \right ) \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cot(x)^2)^(1/2),x)

[Out]

-1/2*(a*cot(x)^2)^(1/2)/cot(x)*ln(cot(x)^2+1)

________________________________________________________________________________________

Maxima [A]  time = 1.62628, size = 27, normalized size = 1.69 \begin{align*} -\frac{1}{2} \, \sqrt{a} \log \left (\tan \left (x\right )^{2} + 1\right ) + \sqrt{a} \log \left (\tan \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cot(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/2*sqrt(a)*log(tan(x)^2 + 1) + sqrt(a)*log(tan(x))

________________________________________________________________________________________

Fricas [B]  time = 1.64949, size = 126, normalized size = 7.88 \begin{align*} \frac{\sqrt{-\frac{a \cos \left (2 \, x\right ) + a}{\cos \left (2 \, x\right ) - 1}} \log \left (-\frac{1}{2} \, \cos \left (2 \, x\right ) + \frac{1}{2}\right ) \sin \left (2 \, x\right )}{2 \,{\left (\cos \left (2 \, x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cot(x)^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(-(a*cos(2*x) + a)/(cos(2*x) - 1))*log(-1/2*cos(2*x) + 1/2)*sin(2*x)/(cos(2*x) + 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \cot ^{2}{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cot(x)**2)**(1/2),x)

[Out]

Integral(sqrt(a*cot(x)**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.24426, size = 27, normalized size = 1.69 \begin{align*} \frac{1}{2} \, \sqrt{a} \log \left (-\cos \left (x\right )^{2} + 1\right ) \mathrm{sgn}\left (\cos \left (x\right )\right ) \mathrm{sgn}\left (\sin \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cot(x)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(a)*log(-cos(x)^2 + 1)*sgn(cos(x))*sgn(sin(x))